package com.tbit.manager.api;

import com.tbit.manager.api.dto.AgentDepositVipDTO;
import com.tbit.manager.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 用户区域免押 openfeign接口
 *
 * @author ：zhangtianyou
 * @since 2024/11/22
 */
@FeignClient(name = ApiConstants.NAME)
public interface AgentDepositVipApi {

    String PREFIX = ApiConstants.PREFIX + "/agentDepositVip";

    /**
     * 修改免押到期时间
     *
     * @param agentDepositVipDTO 用户区域免押实体类
     */
    @PostMapping(value = PREFIX + "/editAgentDepositVip", consumes = "application/json", produces = "application/json")
    void editAgentDepositVip(@RequestBody AgentDepositVipDTO agentDepositVipDTO);
    /**
     * 根据用户id和区域id获取免押卡
     *
     * @param userId 用户id
     * @param accountId 区域id
     */
    @GetMapping(value = PREFIX + "/getByUserIdAndAccountId")
    AgentDepositVipDTO getByUserIdAndAccountId(@RequestParam("userId") Integer userId,@RequestParam("accountId") Integer accountId);
}
